<?php echo $this->Html->css('contact_us'); ?>
<?php echo $this->Html->script('jquery.validate'); ?>
<?php echo $this->fetch('script'); ?>
<!--Header Coding Start Here-->
<div id="c_header">
    <div id="c_container">
        <?php echo $this->element('message'); ?>
        <div id="c_box">
            <div id="c_top"> <p>Contact Us</p></div>
            <div id="c_img">
                <p><?php echo (isset($description) ? $description['Settings']['value'] : ''); ?></p>
                <?php echo (isset($img) ? '<img src="'.$img['Settings']['value'].'" />' : ''); ?>
            </div>
            <div id="c_form">

                <div id="contact_form" class="form">
                    <form action="" method="post" enctype="multipart/form-data" id="form">
                        <table>
                            <tbody>
                                <tr><td><input type="text" id="full_name" placeholder="Your Name" autofocus="autofocus" name="name" required="required"/></td></tr>
                                <tr><td><input type="text" id="telephone" placeholder="Telephone" name="mobile" /></td></tr>
                                <tr><td><input type="text" id="email" placeholder="Email" name="email" required="required"/></td></tr>
                                <tr><td><textarea rows="8" cols="35" placeholder="Message" name="message"></textarea></td></tr>
                                <tr><td><input type="submit" name="contact" id="submit" />&nbsp; &nbsp;<input type="reset" name="submit" id="submit" /></td></tr>
                            </tbody>
                        </table>



                    </form>
                </div>

                <div id="map" class="form"><?php echo (isset($map) ? $map['Settings']['value'] : ''); ?></div></div>
        </div>
    </div>
</div>
<!--Header Coing Ends Here-->
<!--Registration Coding Ends Here-->
<?php echo $this->element('footer'); ?>

<script>
    // Form validation code will come here.
    $(document).ready(function (e) {
        $("#form").validate({
            rules: {
                name: "required",
                mobile: {
                    number: /[0-9]/,
                    required: true,
                    minlength: 10
                },
                email: {
                    required: true,
                    email: true
                }
            },
            messages: {
                name: "Please enter your name",
                mobile: {
                    required: "Enter Your Mobile No.",
                    minlength: "Enter at least 10 number",
                },
                email: "Please enter a valid email address"
            }
        });

    });

</script>
